package com.tdijoy.marqueen;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.ImageView;
import android.widget.Toast;

public class MainActivity extends AppCompatActivity {

    private TvMarqueeText tvMarqueeText;
    private ImageView hot01;
    private TvRelativeLayoutAsGroup layoutAsGroup;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        hot01 = findViewById(R.id.hot_center_top_surfaceview);
        layoutAsGroup = findViewById(R.id.hot_center_top_container);
        hot01.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

            }
        });
        layoutAsGroup.setOnChildClickListener(new TvRelativeLayoutAsGroup.OnChildClickListener() {
            @Override
            public void onChildClick(View child) {
                String tag = (String) child.getTag();
                if (tag.equals("101")) {
                    startActivity(new Intent(MainActivity.this,DemoActivity.class));
//                    Toast.makeText(MainActivity.this, "hot02--101 ", Toast.LENGTH_LONG).show();
                }

            }
        });
    }
}
